Integrand size = 23, antiderivative size = 112 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{7/2} f}-\frac {15 \cot (e+f x)}{8 a^3 f}+\frac {\cot (e+f x)}{4 a f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {5 \cot (e+f x)}{8 a^2 f \left (a+b \tan ^2(e+f x)\right )} \]
-15/8*cot(f*x+e)/a^3/f-15/8*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))*b^(1/2)/a^( 7/2)/f+1/4*cot(f*x+e)/a/f/(a+b*tan(f*x+e)^2)^2+5/8*cot(f*x+e)/a^2/f/(a+b*t an(f*x+e)^2)
Time = 1.70 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.29 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {-15 \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )-8 \sqrt {a} \cot (e+f x)+\frac {4 a^{3/2} b^2 \sin (2 (e+f x))}{(a-b) (a+b+(a-b) \cos (2 (e+f x)))^2}-\frac {\sqrt {a} (9 a-7 b) b \sin (2 (e+f x))}{(a-b) (a+b+(a-b) \cos (2 (e+f x)))}}{8 a^{7/2} f} \]
(-15*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]] - 8*Sqrt[a]*Cot[e + f* x] + (4*a^(3/2)*b^2*Sin[2*(e + f*x)])/((a - b)*(a + b + (a - b)*Cos[2*(e + f*x)])^2) - (Sqrt[a]*(9*a - 7*b)*b*Sin[2*(e + f*x)])/((a - b)*(a + b + (a - b)*Cos[2*(e + f*x)])))/(8*a^(7/2)*f)
Time = 0.28 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4146, 253, 253, 264, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (e+f x)^2 \left (a+b \tan (e+f x)^2\right )^3}dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\cot ^2(e+f x)}{\left (b \tan ^2(e+f x)+a\right )^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 253 |
\(\displaystyle \frac {\frac {5 \int \frac {\cot ^2(e+f x)}{\left (b \tan ^2(e+f x)+a\right )^2}d\tan (e+f x)}{4 a}+\frac {\cot (e+f x)}{4 a \left (a+b \tan ^2(e+f x)\right )^2}}{f}\) |
\(\Big \downarrow \) 253 |
\(\displaystyle \frac {\frac {5 \left (\frac {3 \int \frac {\cot ^2(e+f x)}{b \tan ^2(e+f x)+a}d\tan (e+f x)}{2 a}+\frac {\cot (e+f x)}{2 a \left (a+b \tan ^2(e+f x)\right )}\right )}{4 a}+\frac {\cot (e+f x)}{4 a \left (a+b \tan ^2(e+f x)\right )^2}}{f}\) |
\(\Big \downarrow \) 264 |
\(\displaystyle \frac {\frac {5 \left (\frac {3 \left (-\frac {b \int \frac {1}{b \tan ^2(e+f x)+a}d\tan (e+f x)}{a}-\frac {\cot (e+f x)}{a}\right )}{2 a}+\frac {\cot (e+f x)}{2 a \left (a+b \tan ^2(e+f x)\right )}\right )}{4 a}+\frac {\cot (e+f x)}{4 a \left (a+b \tan ^2(e+f x)\right )^2}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {5 \left (\frac {3 \left (-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{3/2}}-\frac {\cot (e+f x)}{a}\right )}{2 a}+\frac {\cot (e+f x)}{2 a \left (a+b \tan ^2(e+f x)\right )}\right )}{4 a}+\frac {\cot (e+f x)}{4 a \left (a+b \tan ^2(e+f x)\right )^2}}{f}\) |
(Cot[e + f*x]/(4*a*(a + b*Tan[e + f*x]^2)^2) + (5*((3*(-((Sqrt[b]*ArcTan[( Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/a^(3/2)) - Cot[e + f*x]/a))/(2*a) + Cot[e + f*x]/(2*a*(a + b*Tan[e + f*x]^2))))/(4*a))/f
3.1.89.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-(c*x )^(m + 1))*((a + b*x^2)^(p + 1)/(2*a*c*(p + 1))), x] + Simp[(m + 2*p + 3)/( 2*a*(p + 1)) Int[(c*x)^m*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, m }, x] && LtQ[p, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^( m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] - Simp[b*((m + 2*p + 3)/(a*c ^2*(m + 1))) Int[(c*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, p }, x] && LtQ[m, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Time = 1.02 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.74
method | result | size |
derivativedivides | \(\frac {-\frac {1}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (\frac {\frac {7 b \tan \left (f x +e \right )^{3}}{8}+\frac {9 \tan \left (f x +e \right ) a}{8}}{\left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {15 \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}}{f}\) | \(83\) |
default | \(\frac {-\frac {1}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (\frac {\frac {7 b \tan \left (f x +e \right )^{3}}{8}+\frac {9 \tan \left (f x +e \right ) a}{8}}{\left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {15 \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}}{f}\) | \(83\) |
risch | \(-\frac {i \left (8 a^{4} {\mathrm e}^{8 i \left (f x +e \right )}-23 a^{3} b \,{\mathrm e}^{8 i \left (f x +e \right )}+45 a^{2} b^{2} {\mathrm e}^{8 i \left (f x +e \right )}-45 a \,b^{3} {\mathrm e}^{8 i \left (f x +e \right )}+15 b^{4} {\mathrm e}^{8 i \left (f x +e \right )}+32 a^{4} {\mathrm e}^{6 i \left (f x +e \right )}-46 a^{3} b \,{\mathrm e}^{6 i \left (f x +e \right )}+90 a \,b^{3} {\mathrm e}^{6 i \left (f x +e \right )}-60 b^{4} {\mathrm e}^{6 i \left (f x +e \right )}+48 a^{4} {\mathrm e}^{4 i \left (f x +e \right )}-64 a^{3} b \,{\mathrm e}^{4 i \left (f x +e \right )}+10 a^{2} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-100 a \,b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+90 b^{4} {\mathrm e}^{4 i \left (f x +e \right )}+32 a^{4} {\mathrm e}^{2 i \left (f x +e \right )}-82 a^{3} b \,{\mathrm e}^{2 i \left (f x +e \right )}+110 a \,b^{3} {\mathrm e}^{2 i \left (f x +e \right )}-60 b^{4} {\mathrm e}^{2 i \left (f x +e \right )}+8 a^{4}-41 a^{3} b +73 a^{2} b^{2}-55 a \,b^{3}+15 b^{4}\right )}{4 \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) \left (a^{2}-2 a b +b^{2}\right ) \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )^{2} a^{3} f}-\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{16 a^{4} f}+\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{16 a^{4} f}\) | \(483\) |
1/f*(-1/a^3/tan(f*x+e)-1/a^3*b*((7/8*b*tan(f*x+e)^3+9/8*tan(f*x+e)*a)/(a+b *tan(f*x+e)^2)^2+15/8/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))))
Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (96) = 192\).
Time = 0.36 (sec) , antiderivative size = 555, normalized size of antiderivative = 4.96 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\left [-\frac {4 \, {\left (8 \, a^{2} - 25 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} + 20 \, {\left (5 \, a b - 6 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{3} - a b \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}} \sin \left (f x + e\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) + 60 \, b^{2} \cos \left (f x + e\right )}{32 \, {\left (a^{3} b^{2} f + {\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - a^{3} b^{2}\right )} f \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}, -\frac {2 \, {\left (8 \, a^{2} - 25 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} + 10 \, {\left (5 \, a b - 6 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 30 \, b^{2} \cos \left (f x + e\right )}{16 \, {\left (a^{3} b^{2} f + {\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - a^{3} b^{2}\right )} f \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right ] \]
[-1/32*(4*(8*a^2 - 25*a*b + 15*b^2)*cos(f*x + e)^5 + 20*(5*a*b - 6*b^2)*co s(f*x + e)^3 - 15*((a^2 - 2*a*b + b^2)*cos(f*x + e)^4 + 2*(a*b - b^2)*cos( f*x + e)^2 + b^2)*sqrt(-b/a)*log(((a^2 + 6*a*b + b^2)*cos(f*x + e)^4 - 2*( 3*a*b + b^2)*cos(f*x + e)^2 + 4*((a^2 + a*b)*cos(f*x + e)^3 - a*b*cos(f*x + e))*sqrt(-b/a)*sin(f*x + e) + b^2)/((a^2 - 2*a*b + b^2)*cos(f*x + e)^4 + 2*(a*b - b^2)*cos(f*x + e)^2 + b^2))*sin(f*x + e) + 60*b^2*cos(f*x + e))/ ((a^3*b^2*f + (a^5 - 2*a^4*b + a^3*b^2)*f*cos(f*x + e)^4 + 2*(a^4*b - a^3* b^2)*f*cos(f*x + e)^2)*sin(f*x + e)), -1/16*(2*(8*a^2 - 25*a*b + 15*b^2)*c os(f*x + e)^5 + 10*(5*a*b - 6*b^2)*cos(f*x + e)^3 - 15*((a^2 - 2*a*b + b^2 )*cos(f*x + e)^4 + 2*(a*b - b^2)*cos(f*x + e)^2 + b^2)*sqrt(b/a)*arctan(1/ 2*((a + b)*cos(f*x + e)^2 - b)*sqrt(b/a)/(b*cos(f*x + e)*sin(f*x + e)))*si n(f*x + e) + 30*b^2*cos(f*x + e))/((a^3*b^2*f + (a^5 - 2*a^4*b + a^3*b^2)* f*cos(f*x + e)^4 + 2*(a^4*b - a^3*b^2)*f*cos(f*x + e)^2)*sin(f*x + e))]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]
Time = 0.32 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.94 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {15 \, b^{2} \tan \left (f x + e\right )^{4} + 25 \, a b \tan \left (f x + e\right )^{2} + 8 \, a^{2}}{a^{3} b^{2} \tan \left (f x + e\right )^{5} + 2 \, a^{4} b \tan \left (f x + e\right )^{3} + a^{5} \tan \left (f x + e\right )} + \frac {15 \, b \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{3}}}{8 \, f} \]
-1/8*((15*b^2*tan(f*x + e)^4 + 25*a*b*tan(f*x + e)^2 + 8*a^2)/(a^3*b^2*tan (f*x + e)^5 + 2*a^4*b*tan(f*x + e)^3 + a^5*tan(f*x + e)) + 15*b*arctan(b*t an(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^3))/f
Time = 0.83 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.92 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {15 \, {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )} b}{\sqrt {a b} a^{3}} + \frac {7 \, b^{2} \tan \left (f x + e\right )^{3} + 9 \, a b \tan \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{2} a^{3}} + \frac {8}{a^{3} \tan \left (f x + e\right )}}{8 \, f} \]
-1/8*(15*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt (a*b)))*b/(sqrt(a*b)*a^3) + (7*b^2*tan(f*x + e)^3 + 9*a*b*tan(f*x + e))/(( b*tan(f*x + e)^2 + a)^2*a^3) + 8/(a^3*tan(f*x + e)))/f
Time = 10.48 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.91 \[ \int \frac {\csc ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {1}{a}+\frac {25\,b\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8\,a^2}+\frac {15\,b^2\,{\mathrm {tan}\left (e+f\,x\right )}^4}{8\,a^3}}{f\,\left (a^2\,\mathrm {tan}\left (e+f\,x\right )+2\,a\,b\,{\mathrm {tan}\left (e+f\,x\right )}^3+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^5\right )}-\frac {15\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )}{\sqrt {a}}\right )}{8\,a^{7/2}\,f} \]